3.58 \(\int \frac {(a+b \sec (c+d \sqrt {x}))^2}{\sqrt {x}} \, dx\)

Optimal. Leaf size=47 \[ 2 a^2 \sqrt {x}+\frac {4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}+\frac {2 b^2 \tan \left (c+d \sqrt {x}\right )}{d} \]

[Out]

4*a*b*arctanh(sin(c+d*x^(1/2)))/d+2*a^2*x^(1/2)+2*b^2*tan(c+d*x^(1/2))/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {4204, 3773, 3770, 3767, 8} \[ 2 a^2 \sqrt {x}+\frac {4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}+\frac {2 b^2 \tan \left (c+d \sqrt {x}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*Sqrt[x]])^2/Sqrt[x],x]

[Out]

2*a^2*Sqrt[x] + (4*a*b*ArcTanh[Sin[c + d*Sqrt[x]]])/d + (2*b^2*Tan[c + d*Sqrt[x]])/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3773

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[a^2*x, x] + (Dist[2*a*b, Int[Csc[c + d*x], x],
 x] + Dist[b^2, Int[Csc[c + d*x]^2, x], x]) /; FreeQ[{a, b, c, d}, x]

Rule 4204

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\left (a+b \sec \left (c+d \sqrt {x}\right )\right )^2}{\sqrt {x}} \, dx &=2 \operatorname {Subst}\left (\int (a+b \sec (c+d x))^2 \, dx,x,\sqrt {x}\right )\\ &=2 a^2 \sqrt {x}+(4 a b) \operatorname {Subst}\left (\int \sec (c+d x) \, dx,x,\sqrt {x}\right )+\left (2 b^2\right ) \operatorname {Subst}\left (\int \sec ^2(c+d x) \, dx,x,\sqrt {x}\right )\\ &=2 a^2 \sqrt {x}+\frac {4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}-\frac {\left (2 b^2\right ) \operatorname {Subst}\left (\int 1 \, dx,x,-\tan \left (c+d \sqrt {x}\right )\right )}{d}\\ &=2 a^2 \sqrt {x}+\frac {4 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )}{d}+\frac {2 b^2 \tan \left (c+d \sqrt {x}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.28, size = 45, normalized size = 0.96 \[ \frac {2 \left (a^2 d \sqrt {x}+2 a b \tanh ^{-1}\left (\sin \left (c+d \sqrt {x}\right )\right )+b^2 \tan \left (c+d \sqrt {x}\right )\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*Sqrt[x]])^2/Sqrt[x],x]

[Out]

(2*(a^2*d*Sqrt[x] + 2*a*b*ArcTanh[Sin[c + d*Sqrt[x]]] + b^2*Tan[c + d*Sqrt[x]]))/d

________________________________________________________________________________________

fricas [B]  time = 0.79, size = 91, normalized size = 1.94 \[ \frac {2 \, {\left (a^{2} d \sqrt {x} \cos \left (d \sqrt {x} + c\right ) + a b \cos \left (d \sqrt {x} + c\right ) \log \left (\sin \left (d \sqrt {x} + c\right ) + 1\right ) - a b \cos \left (d \sqrt {x} + c\right ) \log \left (-\sin \left (d \sqrt {x} + c\right ) + 1\right ) + b^{2} \sin \left (d \sqrt {x} + c\right )\right )}}{d \cos \left (d \sqrt {x} + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="fricas")

[Out]

2*(a^2*d*sqrt(x)*cos(d*sqrt(x) + c) + a*b*cos(d*sqrt(x) + c)*log(sin(d*sqrt(x) + c) + 1) - a*b*cos(d*sqrt(x) +
 c)*log(-sin(d*sqrt(x) + c) + 1) + b^2*sin(d*sqrt(x) + c))/(d*cos(d*sqrt(x) + c))

________________________________________________________________________________________

giac [B]  time = 0.75, size = 88, normalized size = 1.87 \[ \frac {2 \, {\left ({\left (d \sqrt {x} + c\right )} a^{2} + 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, b^{2} \tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d \sqrt {x} + \frac {1}{2} \, c\right )^{2} - 1}\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="giac")

[Out]

2*((d*sqrt(x) + c)*a^2 + 2*a*b*log(abs(tan(1/2*d*sqrt(x) + 1/2*c) + 1)) - 2*a*b*log(abs(tan(1/2*d*sqrt(x) + 1/
2*c) - 1)) - 2*b^2*tan(1/2*d*sqrt(x) + 1/2*c)/(tan(1/2*d*sqrt(x) + 1/2*c)^2 - 1))/d

________________________________________________________________________________________

maple [A]  time = 0.76, size = 60, normalized size = 1.28 \[ 2 a^{2} \sqrt {x}+\frac {2 b^{2} \tan \left (c +d \sqrt {x}\right )}{d}+\frac {4 a b \ln \left (\sec \left (c +d \sqrt {x}\right )+\tan \left (c +d \sqrt {x}\right )\right )}{d}+\frac {2 a^{2} c}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x)

[Out]

2*a^2*x^(1/2)+2*b^2*tan(c+d*x^(1/2))/d+4/d*a*b*ln(sec(c+d*x^(1/2))+tan(c+d*x^(1/2)))+2/d*a^2*c

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 50, normalized size = 1.06 \[ 2 \, a^{2} \sqrt {x} + \frac {4 \, a b \log \left (\sec \left (d \sqrt {x} + c\right ) + \tan \left (d \sqrt {x} + c\right )\right )}{d} + \frac {2 \, b^{2} \tan \left (d \sqrt {x} + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(c+d*x^(1/2)))^2/x^(1/2),x, algorithm="maxima")

[Out]

2*a^2*sqrt(x) + 4*a*b*log(sec(d*sqrt(x) + c) + tan(d*sqrt(x) + c))/d + 2*b^2*tan(d*sqrt(x) + c)/d

________________________________________________________________________________________

mupad [B]  time = 2.68, size = 109, normalized size = 2.32 \[ 2\,a^2\,\sqrt {x}+\frac {b^2\,4{}\mathrm {i}}{d\,\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,\sqrt {x}\,2{}\mathrm {i}}+1\right )}+\frac {4\,a\,b\,\ln \left (-\frac {a\,b\,4{}\mathrm {i}}{\sqrt {x}}-\frac {4\,a\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}}{\sqrt {x}}\right )}{d}-\frac {4\,a\,b\,\ln \left (\frac {a\,b\,4{}\mathrm {i}}{\sqrt {x}}-\frac {4\,a\,b\,{\mathrm {e}}^{d\,\sqrt {x}\,1{}\mathrm {i}}\,{\mathrm {e}}^{c\,1{}\mathrm {i}}}{\sqrt {x}}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(c + d*x^(1/2)))^2/x^(1/2),x)

[Out]

2*a^2*x^(1/2) + (b^2*4i)/(d*(exp(c*2i + d*x^(1/2)*2i) + 1)) + (4*a*b*log(- (a*b*4i)/x^(1/2) - (4*a*b*exp(d*x^(
1/2)*1i)*exp(c*1i))/x^(1/2)))/d - (4*a*b*log((a*b*4i)/x^(1/2) - (4*a*b*exp(d*x^(1/2)*1i)*exp(c*1i))/x^(1/2)))/
d

________________________________________________________________________________________

sympy [A]  time = 9.75, size = 88, normalized size = 1.87 \[ \begin {cases} \frac {2 a^{2} \left (c + d \sqrt {x}\right ) + 4 a b \log {\left (\tan {\left (c + d \sqrt {x} \right )} + \sec {\left (c + d \sqrt {x} \right )} \right )} + 2 b^{2} \tan {\left (c + d \sqrt {x} \right )}}{d} & \text {for}\: d \neq 0 \\- \sqrt {x} \left (- 2 a^{2} - 4 a b \sec {\relax (c )} - 2 b^{2} \sec ^{2}{\relax (c )}\right ) & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(c+d*x**(1/2)))**2/x**(1/2),x)

[Out]

Piecewise(((2*a**2*(c + d*sqrt(x)) + 4*a*b*log(tan(c + d*sqrt(x)) + sec(c + d*sqrt(x))) + 2*b**2*tan(c + d*sqr
t(x)))/d, Ne(d, 0)), (-sqrt(x)*(-2*a**2 - 4*a*b*sec(c) - 2*b**2*sec(c)**2), True))

________________________________________________________________________________________